<!DOCTYPE html>
<html lang="en-US" dir="ltr">
  <head>
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width,initial-scale=1">
    <title>java集合 | 大兵个人主页</title>
    <meta name="description" content="文档">
    <meta name="generator" content="VitePress v1.6.4">
    <link rel="preload stylesheet" href="/assets/style.D9ik_TFu.css" as="style">
    <link rel="preload stylesheet" href="/vp-icons.css" as="style">
    
    <script type="module" src="/assets/app.D5vCjdCn.js"></script>
    <link rel="preload" href="/assets/inter-roman-latin.Di8DUHzh.woff2" as="font" type="font/woff2" crossorigin="">
    <link rel="modulepreload" href="/assets/chunks/framework.1mMYEF3_.js">
    <link rel="modulepreload" href="/assets/chunks/theme.DBUxysBs.js">
    <link rel="modulepreload" href="/assets/chunks/katex.BbEIqZs1.js">
    <link rel="modulepreload" href="/assets/chunks/c4Diagram-15b5d702.CrMIheLf.js">
    <link rel="modulepreload" href="/assets/chunks/flowDiagram-cbd28bf7.8p3YBUpp.js">
    <link rel="modulepreload" href="/assets/chunks/flowDiagram-v2-ffc7f31a.DNX3ryn0.js">
    <link rel="modulepreload" href="/assets/chunks/erDiagram-880f2ed8.zLNczVyu.js">
    <link rel="modulepreload" href="/assets/chunks/gitGraphDiagram-21fc4d3e.BpXshfIf.js">
    <link rel="modulepreload" href="/assets/chunks/ganttDiagram-04f9e578.r0eBzhTZ.js">
    <link rel="modulepreload" href="/assets/chunks/infoDiagram-4a4f5b27.BFY8QRU8.js">
    <link rel="modulepreload" href="/assets/chunks/pieDiagram-421022e6.DOknSMVr.js">
    <link rel="modulepreload" href="/assets/chunks/quadrantDiagram-0957ecba.DiST45ax.js">
    <link rel="modulepreload" href="/assets/chunks/xychartDiagram-b6496bcd.xWU8Vg5s.js">
    <link rel="modulepreload" href="/assets/chunks/requirementDiagram-23d650b8.BkUBxLkl.js">
    <link rel="modulepreload" href="/assets/chunks/sequenceDiagram-17ac3bff.Dtk1D-go.js">
    <link rel="modulepreload" href="/assets/chunks/classDiagram-d40c83e7.DSBW7gPl.js">
    <link rel="modulepreload" href="/assets/chunks/classDiagram-v2-d5a6b087.N4cskwQr.js">
    <link rel="modulepreload" href="/assets/chunks/stateDiagram-9c5f0230.CMIV4mhW.js">
    <link rel="modulepreload" href="/assets/chunks/stateDiagram-v2-51a3dcff.D3NEHm_K.js">
    <link rel="modulepreload" href="/assets/chunks/journeyDiagram-29694f62.PhMcaRbo.js">
    <link rel="modulepreload" href="/assets/chunks/flowchart-elk-definition-36e2d292.Bl_kk4ch.js">
    <link rel="modulepreload" href="/assets/chunks/timeline-definition-7e6b55e7.D5qEnHZ_.js">
    <link rel="modulepreload" href="/assets/chunks/mindmap-definition-ac74a2e8.B_Vx45Pe.js">
    <link rel="modulepreload" href="/assets/chunks/sankeyDiagram-23345273.BRDIM71c.js">
    <link rel="modulepreload" href="/assets/chunks/blockDiagram-68f4deed.DFaBUiIv.js">
    <link rel="modulepreload" href="/assets/chunks/virtual_mermaid-config.DDnGl6nM.js">
    <link rel="modulepreload" href="/assets/java_base_collection.md.C0-GOF7g.lean.js">
    <link rel="icon" href="/favicon.ico">
    <script>var _hmt=_hmt||[];(function(){var e=document.createElement("script");e.src="https://hm.baidu.com/hm.js?32d81e1cc669a3aef7da8deccdd959ef";var t=document.getElementsByTagName("script")[0];t.parentNode.insertBefore(e,t)})();</script>
    <script id="check-dark-mode">(()=>{const e=localStorage.getItem("vitepress-theme-appearance")||"auto",a=window.matchMedia("(prefers-color-scheme: dark)").matches;(!e||e==="auto"?a:e==="dark")&&document.documentElement.classList.add("dark")})();</script>
    <script id="check-mac-os">document.documentElement.classList.toggle("mac",/Mac|iPhone|iPod|iPad/i.test(navigator.platform));</script>
  </head>
  <body>
    <div id="app"><div class="Layout" data-v-5d98c3a5><!--[--><!--]--><!--[--><span tabindex="-1" data-v-0b0ada53></span><a href="#VPContent" class="VPSkipLink visually-hidden" data-v-0b0ada53>Skip to content</a><!--]--><!----><header class="VPNav" data-v-5d98c3a5 data-v-ae24b3ad><div class="VPNavBar" data-v-ae24b3ad data-v-6aa21345><div class="wrapper" data-v-6aa21345><div class="container" data-v-6aa21345><div class="title" data-v-6aa21345><div class="VPNavBarTitle has-sidebar" data-v-6aa21345 data-v-1168a8e4><a class="title" href="/" data-v-1168a8e4><!--[--><!--]--><!----><span data-v-1168a8e4>大兵个人主页</span><!--[--><!--]--></a></div></div><div class="content" data-v-6aa21345><div class="content-body" data-v-6aa21345><!--[--><!--]--><div class="VPNavBarSearch search" data-v-6aa21345><!--[--><!----><div id="local-search"><button type="button" class="DocSearch DocSearch-Button" aria-label="Search"><span class="DocSearch-Button-Container"><span class="vp-icon DocSearch-Search-Icon"></span><span class="DocSearch-Button-Placeholder">Search</span></span><span class="DocSearch-Button-Keys"><kbd class="DocSearch-Button-Key"></kbd><kbd class="DocSearch-Button-Key">K</kbd></span></button></div><!--]--></div><nav aria-labelledby="main-nav-aria-label" class="VPNavBarMenu menu" data-v-6aa21345 data-v-dc692963><span id="main-nav-aria-label" class="visually-hidden" data-v-dc692963> Main Navigation </span><!--[--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>首页</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ai/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>AI</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/database/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>database</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/java/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>java</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/ops/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>ops</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/os/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>os</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/other/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>other</span><!--]--></a><!--]--><!--[--><a class="VPLink link VPNavBarMenuLink" href="/util/" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>util</span><!--]--></a><!--]--><!--[--><a class="VPLink link vp-external-link-icon VPNavBarMenuLink" href="https://www.500d.me/cvresume/3244698236/" target="_blank" rel="noreferrer" tabindex="0" data-v-dc692963 data-v-e56f3d57><!--[--><span data-v-e56f3d57>关于我</span><!--]--></a><!--]--><!--[--><div class="VPFlyout VPNavBarMenuGroup" data-v-dc692963 data-v-cf11d7a2><button type="button" class="button" aria-haspopup="true" aria-expanded="false" data-v-cf11d7a2><span class="text" data-v-cf11d7a2><!----><span data-v-cf11d7a2>其他网站</span><span class="vpi-chevron-down text-icon" data-v-cf11d7a2></span></span></button><div class="menu" data-v-cf11d7a2><div class="VPMenu" data-v-cf11d7a2 data-v-b98bc113><div class="items" data-v-b98bc113><!--[--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-35975db6><a class="VPLink link vp-external-link-icon" href="https://github.com/db117" target="_blank" rel="noreferrer" data-v-35975db6><!--[--><span data-v-35975db6>github</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-35975db6><a class="VPLink link vp-external-link-icon" href="https://leetcode.cn/u/db117/" target="_blank" rel="noreferrer" data-v-35975db6><!--[--><span data-v-35975db6>leetcode</span><!--]--></a></div><!--]--><!--[--><div class="VPMenuLink" data-v-b98bc113 data-v-35975db6><a class="VPLink link vp-external-link-icon" href="https://www.processon.com/u/5aaa7a7ee4b0a84684088ded" target="_blank" rel="noreferrer" data-v-35975db6><!--[--><span data-v-35975db6>processon</span><!--]--></a></div><!--]--><!--]--></div><!--[--><!--]--></div></div></div><!--]--><!--]--></nav><!----><div class="VPNavBarAppearance appearance" data-v-6aa21345 data-v-6c893767><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-6c893767 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div><div class="VPSocialLinks VPNavBarSocialLinks social-links" data-v-6aa21345 data-v-0394ad82 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/db117" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://leetcode.cn/u/db117/" aria-label="cool link" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="100" height="100" viewBox="0 0 16 16"><path d="M 10.447266 0.265625 A 0.50005 0.50005 0 0 0 10.103516 0.41796875 L 5.65625 4.8671875 L 3.0957031 7.4257812 A 0.50005 0.50005 0 0 0 2.9785156 7.6035156 C 1.769869 8.9739016 1.7865696 11.063913 3.0957031 12.373047 L 5.65625 14.933594 C 7.0176322 16.294976 9.242133 16.294976 10.603516 14.933594 L 12.853516 12.683594 A 0.50063809 0.50063809 0 1 0 12.144531 11.976562 L 9.8945312 14.226562 C 8.9159134 15.20518 7.3418991 15.20518 6.3632812 14.226562 L 3.8027344 11.666016 C 2.8241166 10.687398 2.8241166 9.1114303 3.8027344 8.1328125 L 6.3632812 5.5742188 C 7.3418991 4.5956009 8.9159135 4.5956009 9.8945312 5.5742188 L 12.144531 7.8242188 A 0.50063784 0.50063784 0 1 0 12.853516 7.1171875 L 10.603516 4.8671875 C 9.9106907 4.174363 8.9943718 3.8431189 8.0820312 3.8554688 L 10.8125 1.125 A 0.50005 0.50005 0 0 0 10.447266 0.265625 z M 7.328125 9.4003906 A 0.50005 0.50005 0 1 0 7.328125 10.400391 L 14.228516 10.400391 A 0.50005 0.50005 0 1 0 14.228516 9.4003906 L 7.328125 9.4003906 z"></path></svg></a><!--]--></div><div class="VPFlyout VPNavBarExtra extra" data-v-6aa21345 data-v-bb2aa2f0 data-v-cf11d7a2><button type="button" class="button" aria-haspopup="true" aria-expanded="false" aria-label="extra navigation" data-v-cf11d7a2><span class="vpi-more-horizontal icon" data-v-cf11d7a2></span></button><div class="menu" data-v-cf11d7a2><div class="VPMenu" data-v-cf11d7a2 data-v-b98bc113><!----><!--[--><!--[--><!----><div class="group" data-v-bb2aa2f0><div class="item appearance" data-v-bb2aa2f0><p class="label" data-v-bb2aa2f0>Appearance</p><div class="appearance-action" data-v-bb2aa2f0><button class="VPSwitch VPSwitchAppearance" type="button" role="switch" title aria-checked="false" data-v-bb2aa2f0 data-v-5337faa4 data-v-1d5665e3><span class="check" data-v-1d5665e3><span class="icon" data-v-1d5665e3><!--[--><span class="vpi-sun sun" data-v-5337faa4></span><span class="vpi-moon moon" data-v-5337faa4></span><!--]--></span></span></button></div></div></div><div class="group" data-v-bb2aa2f0><div class="item social-links" data-v-bb2aa2f0><div class="VPSocialLinks social-links-list" data-v-bb2aa2f0 data-v-7bc22406><!--[--><a class="VPSocialLink no-icon" href="https://github.com/db117" aria-label="github" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><span class="vpi-social-github"></span></a><a class="VPSocialLink no-icon" href="https://leetcode.cn/u/db117/" aria-label="cool link" target="_blank" rel="noopener" data-v-7bc22406 data-v-bd121fe5><svg xmlns="http://www.w3.org/2000/svg" x="0px" y="0px" width="100" height="100" viewBox="0 0 16 16"><path d="M 10.447266 0.265625 A 0.50005 0.50005 0 0 0 10.103516 0.41796875 L 5.65625 4.8671875 L 3.0957031 7.4257812 A 0.50005 0.50005 0 0 0 2.9785156 7.6035156 C 1.769869 8.9739016 1.7865696 11.063913 3.0957031 12.373047 L 5.65625 14.933594 C 7.0176322 16.294976 9.242133 16.294976 10.603516 14.933594 L 12.853516 12.683594 A 0.50063809 0.50063809 0 1 0 12.144531 11.976562 L 9.8945312 14.226562 C 8.9159134 15.20518 7.3418991 15.20518 6.3632812 14.226562 L 3.8027344 11.666016 C 2.8241166 10.687398 2.8241166 9.1114303 3.8027344 8.1328125 L 6.3632812 5.5742188 C 7.3418991 4.5956009 8.9159135 4.5956009 9.8945312 5.5742188 L 12.144531 7.8242188 A 0.50063784 0.50063784 0 1 0 12.853516 7.1171875 L 10.603516 4.8671875 C 9.9106907 4.174363 8.9943718 3.8431189 8.0820312 3.8554688 L 10.8125 1.125 A 0.50005 0.50005 0 0 0 10.447266 0.265625 z M 7.328125 9.4003906 A 0.50005 0.50005 0 1 0 7.328125 10.400391 L 14.228516 10.400391 A 0.50005 0.50005 0 1 0 14.228516 9.4003906 L 7.328125 9.4003906 z"></path></svg></a><!--]--></div></div></div><!--]--><!--]--></div></div></div><!--[--><!--]--><button type="button" class="VPNavBarHamburger hamburger" aria-label="mobile navigation" aria-expanded="false" aria-controls="VPNavScreen" data-v-6aa21345 data-v-e5dd9c1c><span class="container" data-v-e5dd9c1c><span class="top" data-v-e5dd9c1c></span><span class="middle" data-v-e5dd9c1c></span><span class="bottom" data-v-e5dd9c1c></span></span></button></div></div></div></div><div class="divider" data-v-6aa21345><div class="divider-line" data-v-6aa21345></div></div></div><!----></header><div class="VPLocalNav has-sidebar empty" data-v-5d98c3a5 data-v-a6f0e41e><div class="container" data-v-a6f0e41e><button class="menu" aria-expanded="false" aria-controls="VPSidebarNav" data-v-a6f0e41e><span class="vpi-align-left menu-icon" data-v-a6f0e41e></span><span class="menu-text" data-v-a6f0e41e>Menu</span></button><div class="VPLocalNavOutlineDropdown" style="--vp-vh:0px;" data-v-a6f0e41e data-v-8a42e2b4><button data-v-8a42e2b4>Return to top</button><!----></div></div></div><aside class="VPSidebar" data-v-5d98c3a5 data-v-319d5ca6><div class="curtain" data-v-319d5ca6></div><nav class="nav" id="VPSidebarNav" aria-labelledby="sidebar-aria-label" tabindex="-1" data-v-319d5ca6><span class="visually-hidden" id="sidebar-aria-label" data-v-319d5ca6> Sidebar Navigation </span><!--[--><!--]--><!--[--><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JDK/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>JDK</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JDK/Buffer.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>JDK 中的 buffer 体系</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>JVM</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JVM/JVM%20parameter.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>JVM参数</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JVM/gc.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>垃圾回收</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JVM/jvm%20remote.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>java开启远程访问</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JVM/object.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>对象相关</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/JVM/synchronized.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>synchronized</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 has-active" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>base</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/base/collection.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>java集合</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/base/jdk%20source%20code%20make.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>jdk源码编译</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/base/string%20support%20switch.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>string support switch.md</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/concurrent/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>concurrent</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/concurrent/AbstractQueuedSynchronizer.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>AbstractQueuedSynchronizer相关</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/concurrent/CompletableFuture.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>CompletableFuture</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/concurrent/ThreadPool.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>线程池</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/netty/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>netty</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/netty/IO.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>netty 内存模型</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>other</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/MyBatis.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MyBatis</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/MybatisPlus.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>MybatisPlus</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/Netty.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>netty 主要流程</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/bytebuddy.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>byte-buddy 简单使用</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/caffeine.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>caffeine</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/excel%20import.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>大量Excel导入</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/jackjson.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>jackson常见操作</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/jetCache.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>jetCache</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/maven.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>maven</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/micrometer.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>micrometer</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/rocket.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>rocketMQ</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/other/shardingsphere.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>shardingsphere</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><!----><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/solve%20production%20problems.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>线上问题分析</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>spring</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/JdbcTemplate.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>JdbcTemplate</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/Spring%20Bean%E6%8E%A5%E5%8F%A3.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring Bean接口</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/Spring%20IOC.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Spring IOC</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/Spring-aop.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring-aop</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/SpringMVC%E4%B8%AD%E8%8E%B7%E5%8F%96request.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>SpringMVC中获取request</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/Spring%E6%89%A9%E5%B1%95%E6%8E%A5%E5%8F%A3%E5%8D%B3%E6%89%A7%E8%A1%8C%E6%B5%81%E7%A8%8B.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Spring扩展接口即执行流程</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/error.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>常见异常</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/event.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Spring event</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/spring-webflux.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring-webflux</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring/%E6%B5%81%E7%A8%8B%E5%9B%BE%E5%90%88%E9%9B%86.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>流程图合集</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-boot/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>spring-boot</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-boot/actuator.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Spring Boot - Actuator</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-boot/spring-boot%E5%90%AF%E5%8A%A8%E6%B5%81%E7%A8%8B.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring-boot启动流程</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0 is-link" data-v-c40bc020 data-v-b3fd67f8><div class="item" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-cloud/index.html" data-v-b3fd67f8><!--[--><h2 class="text" data-v-b3fd67f8>spring-cloud</h2><!--]--></a><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-cloud/context.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring-cloud-context 详细源码</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-cloud/gateway.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>gateway</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-cloud/openfeign.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>spring-cloud-openfeign</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/spring-cloud/sentinel.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>sentinel</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><div class="no-transition group" data-v-c40bc020><section class="VPSidebarItem level-0" data-v-c40bc020 data-v-b3fd67f8><div class="item" role="button" tabindex="0" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><h2 class="text" data-v-b3fd67f8>util</h2><!----></div><div class="items" data-v-b3fd67f8><!--[--><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/util/JMH.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>JMH基准测试</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/util/arthas.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>arthas 诊断工具</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/util/dateUtil.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>java 时间工具</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/util/jdk%20util.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>jdk工具</p><!--]--></a><!----></div><!----></div><div class="VPSidebarItem level-1 is-link" data-v-b3fd67f8 data-v-b3fd67f8><div class="item" data-v-b3fd67f8><div class="indicator" data-v-b3fd67f8></div><a class="VPLink link link" href="/java/util/reactor.html" data-v-b3fd67f8><!--[--><p class="text" data-v-b3fd67f8>Reactor</p><!--]--></a><!----></div><!----></div><!--]--></div></section></div><!--]--><!--[--><!--]--></nav></aside><div class="VPContent has-sidebar" id="VPContent" data-v-5d98c3a5 data-v-1428d186><div class="VPDoc has-sidebar has-aside" data-v-1428d186 data-v-39a288b8><!--[--><!--]--><div class="container" data-v-39a288b8><div class="aside" data-v-39a288b8><div class="aside-curtain" data-v-39a288b8></div><div class="aside-container" data-v-39a288b8><div class="aside-content" data-v-39a288b8><div class="VPDocAside" data-v-39a288b8 data-v-3f215769><!--[--><!--]--><!--[--><!--]--><nav aria-labelledby="doc-outline-aria-label" class="VPDocAsideOutline" data-v-3f215769 data-v-a5bbad30><div class="content" data-v-a5bbad30><div class="outline-marker" data-v-a5bbad30></div><div aria-level="2" class="outline-title" id="doc-outline-aria-label" role="heading" data-v-a5bbad30>当前页</div><ul class="VPDocOutlineItem root" data-v-a5bbad30 data-v-b933a997><!--[--><!--]--></ul></div></nav><!--[--><!--]--><div class="spacer" data-v-3f215769></div><!--[--><!--]--><!----><!--[--><!--]--><!--[--><!--]--></div></div></div></div><div class="content" data-v-39a288b8><div class="content-container" data-v-39a288b8><!--[--><!--]--><main class="main" data-v-39a288b8><div style="position:relative;" class="vp-doc _java_base_collection" data-v-39a288b8><div><iframe id="embed_dom" name="embed_dom" frameborder="0" style="display:block;width:725px;height:245px;" src="https://www.processon.com/embed/60e5834f6376892c1ec611af"></iframe><h2 id="list" tabindex="-1">List <a class="header-anchor" href="#list" aria-label="Permalink to &quot;List&quot;">​</a></h2><h3 id="arraylist" tabindex="-1">ArrayList <a class="header-anchor" href="#arraylist" aria-label="Permalink to &quot;ArrayList&quot;">​</a></h3><blockquote><p><code>java.util.ArrayList</code></p><p>最常用的集合,实现方式为数组</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ArrayList&lt;E&gt; extends AbstractList&lt;E&gt;</span></span>
<span class="line"><span>        implements List&lt;E&gt;, RandomAccess, Cloneable, java.io.Serializable</span></span></code></pre></div><ul><li><p>使用<code>transient Object[] elementData;</code>来保存数据，默认大小为10</p></li><li><p>每一次扩容为之前的1.5倍<code>int newCapacity = oldCapacity + (oldCapacity &gt;&gt; 1);</code></p></li><li><p>标记为java.util.RandomAccess，可进行随机访问</p></li><li><p>删除元素需要调用 <code>System.arraycopy()</code> 将 index+1 后面的元素都复制到 index 位置上，该操作的时间复杂度为 O(N)</p></li><li><p>subList</p><blockquote><p>访问时通过从定向index来实现，添加修改会改变原来的List</p></blockquote></li><li><p><code>java.util.Arrays.ArrayList</code>为<code>Arrays</code>的实现，不能修改。但是可以get，set</p></li></ul><h3 id="linkedlist" tabindex="-1">LinkedList <a class="header-anchor" href="#linkedlist" aria-label="Permalink to &quot;LinkedList&quot;">​</a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedList&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractSequentialList&lt;E&gt;</span></span>
<span class="line"><span>    implements List&lt;E&gt;, Deque&lt;E&gt;, Cloneable, java.io.Serializable</span></span></code></pre></div><blockquote><p><code>java.util.LinkedList</code></p><p>相比ArrayList多实现了java.util.Deque接口</p><p>使用双向链表来保存数据</p></blockquote><ul><li>不要通过index进行操作，会遍历链表</li></ul><h3 id="vector-线程安全" tabindex="-1">Vector(线程安全) <a class="header-anchor" href="#vector-线程安全" aria-label="Permalink to &quot;Vector(线程安全)&quot;">​</a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class Vector&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractList&lt;E&gt;</span></span>
<span class="line"><span>    implements List&lt;E&gt;, RandomAccess, Cloneable, java.io.Serializable</span></span></code></pre></div><blockquote><p><code>java.util.Vector</code></p><p>跟java.util.ArrayList类似，不过接口通过synchronized来保证并发安全</p></blockquote><ul><li>扩容直接翻倍</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>// 容量满了后，如果设置了capacityIncrement这按照设置的数量进行增加，否则翻倍</span></span>
<span class="line"><span>int newCapacity = oldCapacity + ((capacityIncrement &gt; 0) ?</span></span>
<span class="line"><span>                                 capacityIncrement : oldCapacity);</span></span></code></pre></div><h3 id="stack-线程安全" tabindex="-1">Stack(线程安全) <a class="header-anchor" href="#stack-线程安全" aria-label="Permalink to &quot;Stack(线程安全)&quot;">​</a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class Stack&lt;E&gt; extends Vector&lt;E&gt;</span></span></code></pre></div><blockquote><p><code>java.util.Stack</code></p><p>直接继承自<code>java.util.Vector</code></p><p>实现stack数据结构</p></blockquote><h3 id="copyonwritearraylist-线程安全" tabindex="-1">CopyOnWriteArrayList(线程安全) <a class="header-anchor" href="#copyonwritearraylist-线程安全" aria-label="Permalink to &quot;CopyOnWriteArrayList(线程安全)&quot;">​</a></h3><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class CopyOnWriteArrayList&lt;E&gt;</span></span>
<span class="line"><span>    implements List&lt;E&gt;, RandomAccess, Cloneable, java.io.Serializable </span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 不存在才加入</span></span>
<span class="line"><span>    // 比其他 list 多的 api </span></span>
<span class="line"><span>    public boolean addIfAbsent(E e)</span></span></code></pre></div><blockquote><p><code>java.util.concurrent.CopyOnWriteArrayList</code></p></blockquote><ul><li>和ArrayList一样，其底层数据结构也是数组，加上transient不让其被序列化，加上volatile修饰来保证多线程下的其可见性和有序性</li><li>CopyOnWriteArrayList适合于多线程场景下使用，其采用读写分离的思想，读操作不上锁，写操作上锁，且写操作效率较低</li><li>CopyOnWriteArrayList基于fail-safe机制，每次修改都会在原先基础上复制一份，修改完毕后在进行替换</li><li>CopyOnWriteArrayList在1.8中采用的是ReentrantLock进行上锁。jdk11中采用的是synchronized进行加锁</li><li><strong>不能保证实时一致性</strong>，只能保证最终一致性</li><li>迭代器使用数组快照。</li></ul><h2 id="map" tabindex="-1">map <a class="header-anchor" href="#map" aria-label="Permalink to &quot;map&quot;">​</a></h2><h3 id="hashmap" tabindex="-1">HashMap <a class="header-anchor" href="#hashmap" aria-label="Permalink to &quot;HashMap&quot;">​</a></h3><blockquote><p>最常用的map，使用拉链发解决 hash 冲突</p><p>在 1.8 后链表长度过长会转换为红黑树</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class HashMap&lt;K,V&gt; extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements Map&lt;K,V&gt;, Cloneable, Serializable </span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>   </span></span>
<span class="line"><span> static final int DEFAULT_INITIAL_CAPACITY = 1 &lt;&lt; 4;// 默认容量</span></span>
<span class="line"><span> static final float DEFAULT_LOAD_FACTOR = 0.75f;// 扩容阈值</span></span>
<span class="line"><span> static final int TREEIFY_THRESHOLD = 8;// 链表改红黑树阈值</span></span>
<span class="line"><span> static final int UNTREEIFY_THRESHOLD = 6;// 红黑树改链表阈值</span></span>
<span class="line"><span> </span></span>
<span class="line"><span> transient Node&lt;K,V&gt;[] table;// 存数据的数组</span></span>
<span class="line"><span> transient int size;// map的数量</span></span>
<span class="line"><span> transient int modCount;// 线程不安全是.快速失败</span></span>
<span class="line"><span> </span></span>
<span class="line"><span> static class Node&lt;K,V&gt; implements Map.Entry&lt;K,V&gt; {</span></span>
<span class="line"><span>        final int hash;//对key的hashcode值进行hash运算后得到的值，存储在Entry，避免重复计算</span></span>
<span class="line"><span>        final K key;</span></span>
<span class="line"><span>        V value;</span></span>
<span class="line"><span>        Node&lt;K,V&gt; next;//存储指向下一个Entry的引用，单链表结构</span></span>
<span class="line"><span> }</span></span>
<span class="line"><span> </span></span>
<span class="line"><span> // 高低位异或,减小冲突</span></span>
<span class="line"><span> static final int hash(Object key) {</span></span>
<span class="line"><span>        int h;</span></span>
<span class="line"><span>        return (key == null) ? 0 : (h = key.hashCode()) ^ (h &gt;&gt;&gt; 16);</span></span>
<span class="line"><span>}</span></span></code></pre></div><h3 id="treemap" tabindex="-1">TreeMap <a class="header-anchor" href="#treemap" aria-label="Permalink to &quot;TreeMap&quot;">​</a></h3><blockquote><p>TreeMap的实现是红黑树算法的实现</p><p>为有序map</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class TreeMap&lt;K,V&gt;</span></span>
<span class="line"><span>    extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements NavigableMap&lt;K,V&gt;, Cloneable, java.io.Serializable</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 重要属性</span></span>
<span class="line"><span>    // 比较器，因为TreeMap是有序的</span></span>
<span class="line"><span>    private final Comparator&lt;? super K&gt; comparator;</span></span>
<span class="line"><span>    //TreeMap红-黑节点，为TreeMap的内部类</span></span>
<span class="line"><span>    private transient Entry&lt;K,V&gt; root = null;</span></span>
<span class="line"><span>    //容器大小</span></span>
<span class="line"><span>    private transient int size = 0;</span></span>
<span class="line"><span>    //TreeMap修改次数</span></span>
<span class="line"><span>    private transient int modCount = 0;</span></span>
<span class="line"><span>    //红黑树的节点颜色--红色</span></span>
<span class="line"><span>    private static final boolean RED = false;</span></span>
<span class="line"><span>    //红黑树的节点颜色--黑色</span></span>
<span class="line"><span>    private static final boolean BLACK = true;</span></span></code></pre></div><h3 id="hashtable-线程安全" tabindex="-1">Hashtable(线程安全) <a class="header-anchor" href="#hashtable-线程安全" aria-label="Permalink to &quot;Hashtable(线程安全)&quot;">​</a></h3><blockquote><p>很古老的线程安全的map</p><p>可以简单粗暴的理解为对 hashmap 的修改方法加锁</p><p>推荐使用 <code>java.util.concurrent.ConcurrentHashMap</code></p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class Hashtable&lt;K,V&gt;</span></span>
<span class="line"><span>    extends Dictionary&lt;K,V&gt;</span></span>
<span class="line"><span>    implements Map&lt;K,V&gt;, Cloneable, java.io.Serializable</span></span></code></pre></div><h3 id="identityhashmap" tabindex="-1">IdentityHashMap <a class="header-anchor" href="#identityhashmap" aria-label="Permalink to &quot;IdentityHashMap&quot;">​</a></h3><blockquote><p><code>Hashmap</code> 使用 equals 来比较是否相等，而<code>IdentityHashMap</code>使用 ==</p><p><strong>不是Map的通用实现</strong>，它有意违反了Map的常规协定。并且IdentityHashMap允许key和value都为null</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class IdentityHashMap&lt;K,V&gt;</span></span>
<span class="line"><span>    extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements Map&lt;K,V&gt;, java.io.Serializable, Cloneable</span></span></code></pre></div><h3 id="linkedhashmap" tabindex="-1">LinkedHashMap <a class="header-anchor" href="#linkedhashmap" aria-label="Permalink to &quot;LinkedHashMap&quot;">​</a></h3><blockquote><p>继承自<code>HashMap</code>，添加双向链表来保证迭代循序</p><p>通过重写 newNode 和 newTreeNode 来说实现添加数据放入队尾</p><p>可扩展实现 LRU 缓存</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedHashMap&lt;K,V&gt;</span></span>
<span class="line"><span>    extends HashMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements Map&lt;K,V&gt;</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 双端列表头</span></span>
<span class="line"><span>    transient LinkedHashMap.Entry&lt;K,V&gt; head;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    // 双端列表尾</span></span>
<span class="line"><span>    transient LinkedHashMap.Entry&lt;K,V&gt; tail;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>		// 链表顺序：{@code true}表示访问顺序，{@code false}表示插入顺序。</span></span>
<span class="line"><span>    final boolean accessOrder;</span></span>
<span class="line"><span>		</span></span>
<span class="line"><span>		// 扩展方法，可以实现 LRU 缓存</span></span>
<span class="line"><span>		// 返回 true 就会在插入数据的时候删除最老的 node</span></span>
<span class="line"><span>    protected boolean removeEldestEntry(Map.Entry&lt;K,V&gt; eldest) {</span></span>
<span class="line"><span>        return false;</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span></span></span>
<span class="line"><span>		// 对 hashmap 中下面三个方法进行重写</span></span>
<span class="line"><span>    // Callbacks to allow LinkedHashMap post-actions</span></span>
<span class="line"><span>    // accessOrder 为 true 时访问数据时会把  node 移动到链表尾部</span></span>
<span class="line"><span>    void afterNodeAccess(Node&lt;K,V&gt; p) { }</span></span>
<span class="line"><span>    // 符合条件会删除最老的 node</span></span>
<span class="line"><span>    void afterNodeInsertion(boolean evict) { }</span></span>
<span class="line"><span>    // 把 node 移动到队列尾部</span></span>
<span class="line"><span>    void afterNodeRemoval(Node&lt;K,V&gt; p) { }</span></span></code></pre></div><h3 id="weakhashmap" tabindex="-1">WeakHashMap <a class="header-anchor" href="#weakhashmap" aria-label="Permalink to &quot;WeakHashMap&quot;">​</a></h3><blockquote><p>主要是用在内存敏感的系统中，当缓存使用</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class WeakHashMap&lt;K,V&gt;</span></span>
<span class="line"><span>    extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements Map&lt;K,V&gt; </span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 准备被 gc 掉的key放入到队列中</span></span>
<span class="line"><span>    private final ReferenceQueue&lt;Object&gt; queue = new ReferenceQueue&lt;&gt;();</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 每一次操作时删除掉在队列中的 key，当 key 被回收时会把 entry 放到队列里面</span></span>
<span class="line"><span>    private void expungeStaleEntries() {}</span></span></code></pre></div><h3 id="enummap" tabindex="-1">EnumMap <a class="header-anchor" href="#enummap" aria-label="Permalink to &quot;EnumMap&quot;">​</a></h3><blockquote><p>key 必须为<code>Eunm</code>的map</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class EnumMap&lt;K extends Enum&lt;K&gt;, V&gt; extends AbstractMap&lt;K, V&gt;</span></span>
<span class="line"><span>    implements java.io.Serializable, Cloneable</span></span></code></pre></div><ul><li>保存数据的数组大小为枚举的数量</li><li>操作数组使用<code>java.lang.Enum#ordinal</code>当index</li></ul><h3 id="concurrenthashmap-线程安全" tabindex="-1">ConcurrentHashMap(线程安全) <a class="header-anchor" href="#concurrenthashmap-线程安全" aria-label="Permalink to &quot;ConcurrentHashMap(线程安全)&quot;">​</a></h3><blockquote><p>最常用的线程安全map，主要结构跟 <code>hashmap</code>差不多。</p><p>synchronized 只锁定当前链表或红⿊⼆叉树的⾸节点，这样只要 hash 不冲突，就不会产⽣并发，效率⼜提升 N 倍。</p></blockquote><h5 id="concurrenthashmap流程图" tabindex="-1">ConcurrentHashMap流程图 <a class="header-anchor" href="#concurrenthashmap流程图" aria-label="Permalink to &quot;ConcurrentHashMap流程图&quot;">​</a></h5><iframe id="embed_dom" name="embed_dom" frameborder="0" style="display:block;width:725px;height:245px;" src="https://www.processon.com/embed/61b6ee4a1efad42237b9a3ac"></iframe><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ConcurrentHashMap&lt;K,V&gt; extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements ConcurrentMap&lt;K,V&gt;, Serializable </span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>// node数组最大容量：2^30=1073741824</span></span>
<span class="line"><span>private static final int MAXIMUM_CAPACITY = 1 &lt;&lt; 30;</span></span>
<span class="line"><span>// 默认初始值，必须是2的幕数</span></span>
<span class="line"><span>private static final int DEFAULT_CAPACITY = 16</span></span>
<span class="line"><span>//数组可能最大值，需要与toArray（）相关方法关联</span></span>
<span class="line"><span>static final int MAX_ARRAY_SIZE = Integer.MAX_VALUE - 8;</span></span>
<span class="line"><span>//并发级别，遗留下来的，为兼容以前的版本 在序列话时使用</span></span>
<span class="line"><span>private static final int DEFAULT_CONCURRENCY_LEVEL = 16;</span></span>
<span class="line"><span>private static final float LOAD_FACTOR = 0.75f;// 负载因子</span></span>
<span class="line"><span>static final int TREEIFY_THRESHOLD = 8;// 链表转红黑树阀值,&gt; 8 链表转换为红黑树</span></span>
<span class="line"><span>//树转链表阀值，小于等于6（tranfer时，lc、hc=0两个计数器分别++记录原bin、新binTreeNode数量，&lt;=UNTREEIFY_THRESHOLD 则untreeify(lo)）</span></span>
<span class="line"><span>static final int UNTREEIFY_THRESHOLD = 6;</span></span>
<span class="line"><span>// 需要转换红黑树的最小阈值 </span></span>
<span class="line"><span>static final int MIN_TREEIFY_CAPACITY = 64;</span></span>
<span class="line"><span>// 2^15-1，help resize的最大线程数</span></span>
<span class="line"><span>private static final int MAX_RESIZERS = (1 &lt;&lt; (32 - RESIZE_STAMP_BITS)) - 1;</span></span>
<span class="line"><span>// 32-16=16，sizeCtl中记录size大小的偏移量</span></span>
<span class="line"><span>private static final int RESIZE_STAMP_SHIFT = 32 - RESIZE_STAMP_BITS</span></span>
<span class="line"><span></span></span>
<span class="line"><span>transient volatile Node&lt;K,V&gt;[] table;//存放node的数组</span></span>
<span class="line"><span></span></span>
<span class="line"><span>private transient volatile Node&lt;K,V&gt;[] nextTable;// 仅仅在扩容是非空</span></span>
<span class="line"><span></span></span>
<span class="line"><span>/*控制标识符，用来控制table的初始化和扩容的操作，不同的值有不同的含义</span></span>
<span class="line"><span> *当为负数时：-1代表正在初始化，-N代表有N-1个线程正在 进行扩容</span></span>
<span class="line"><span> *当为0时：代表当时的table还没有被初始化</span></span>
<span class="line"><span> *当为正数时：表示初始化或者下一次进行扩容的大小</span></span>
<span class="line"><span>private transient volatile int sizeCtl;</span></span>
<span class="line"><span></span></span>
<span class="line"><span></span></span>
<span class="line"><span>// 特定 hash 值</span></span>
<span class="line"><span>static final int MOVED     = -1; // 正在扩容中</span></span>
<span class="line"><span>static final int TREEBIN   = -2; // 已经转换为红黑树了</span></span>
<span class="line"><span>static final int RESERVED  = -3; // compute，computeIfAbsent时用于标记正在处理，只会对数组节点为 null 时出现</span></span>
<span class="line"><span>static final int HASH_BITS = 0x7fffffff; // 会和 hash 进行 &amp; 运算，保证 hash 不小于 0</span></span>
<span class="line"><span></span></span>
<span class="line"><span>// 当当前操作节点正在扩容时辅助扩容</span></span>
<span class="line"><span>final Node&lt;K,V&gt;[] helpTransfer(Node&lt;K,V&gt;[] tab, Node&lt;K,V&gt; f) {}</span></span></code></pre></div><ul><li>使用<code>synchronized</code>锁住链表头或红黑树根节点</li><li>key 和 value 都不容许为 null</li><li>Nod节点中value和next都用volatile修饰，保证并发的可见性</li><li>通过节点 hash 来分辨类型</li></ul><h4 id="节点类型" tabindex="-1">节点类型 <a class="header-anchor" href="#节点类型" aria-label="Permalink to &quot;节点类型&quot;">​</a></h4><h5 id="node" tabindex="-1">Node <a class="header-anchor" href="#node" aria-label="Permalink to &quot;Node&quot;">​</a></h5><blockquote><p>一个链表节点，如果转换成红黑树也会有链表结构</p></blockquote><ul><li>hash：key 的 hash</li><li>next：链表的下一个</li></ul><h5 id="treenode" tabindex="-1">TreeNode <a class="header-anchor" href="#treenode" aria-label="Permalink to &quot;TreeNode&quot;">​</a></h5><blockquote><p>红黑树节点</p><p><code>hash</code> 值为<code>key</code>的 hash值</p></blockquote><h5 id="treebin" tabindex="-1">TreeBin <a class="header-anchor" href="#treebin" aria-label="Permalink to &quot;TreeBin&quot;">​</a></h5><blockquote><p>不保存数据，指向红黑树的根节点。</p><p>提供一个简单的读写锁，保证同时只有一个线程会对当前红黑树进行修改</p><p><code>hash</code> 值为<code>-2</code></p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>TreeNode&lt;K,V&gt; root;            // 指向红黑树根节点</span></span>
<span class="line"><span>volatile TreeNode&lt;K,V&gt; first;  // 保证根节点变化后其他线程的可见性</span></span>
<span class="line"><span>volatile Thread waiter;        // 等待的线程</span></span>
<span class="line"><span>volatile int lockState;        // 锁状态</span></span>
<span class="line"><span></span></span>
<span class="line"><span>static final int WRITER = 1;   // 有线程在修改</span></span>
<span class="line"><span>static final int WAITER = 2;   // 有线程在等待</span></span>
<span class="line"><span>static final int READER = 4;   // 有线程在读的时候对 lockState 的累加值</span></span></code></pre></div><h5 id="forwardingnode" tabindex="-1">ForwardingNode <a class="header-anchor" href="#forwardingnode" aria-label="Permalink to &quot;ForwardingNode&quot;">​</a></h5><blockquote><p>不保存数据，只有一个 <code>nextTable</code> 的引用。</p><p>标记当前节点已经迁移完成，提供一个 <code>find</code> 方法，会到 <code>nextTable</code> 中查找节点。</p><p><code>hash</code> 值为<code>-1</code></p></blockquote><h5 id="reservationnode" tabindex="-1">ReservationNode <a class="header-anchor" href="#reservationnode" aria-label="Permalink to &quot;ReservationNode&quot;">​</a></h5><blockquote><p><code>hash</code> 值为<code>-3</code></p><p>compute，computeIfAbsent时用于标记正在处理，只会对数组节点为 null 时出现</p></blockquote><h3 id="concurrentskiplistmap-线程安全" tabindex="-1">ConcurrentSkipListMap(线程安全) <a class="header-anchor" href="#concurrentskiplistmap-线程安全" aria-label="Permalink to &quot;ConcurrentSkipListMap(线程安全)&quot;">​</a></h3><blockquote><p>提供了一种线程安全的并发访问的排序映射表。内部是SkipList（跳表）结构实现，在理论上能够O(log(n))时间内完成查找、插入、删除操作。</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ConcurrentSkipListMap&lt;K,V&gt; extends AbstractMap&lt;K,V&gt;</span></span>
<span class="line"><span>    implements ConcurrentNavigableMap&lt;K,V&gt;, Cloneable, Serializable</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 使用 node 来保存数据，不参与构建跳表结构</span></span>
<span class="line"><span>    // 有序的链表</span></span>
<span class="line"><span>     static final class Node&lt;K,V&gt; {</span></span>
<span class="line"><span>        final K key; </span></span>
<span class="line"><span>        V val;</span></span>
<span class="line"><span>        Node&lt;K,V&gt; next;</span></span>
<span class="line"><span>    }</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 实现跳表结构</span></span>
<span class="line"><span>    static final class Index&lt;K,V&gt; {</span></span>
<span class="line"><span>        final Node&lt;K,V&gt; node; // 实际保存的数据</span></span>
<span class="line"><span>        final Index&lt;K,V&gt; down;// 指向下一级</span></span>
<span class="line"><span>        Index&lt;K,V&gt; right;			// 指向右边链表</span></span>
<span class="line"><span>    }</span></span></code></pre></div><h2 id="set" tabindex="-1">set <a class="header-anchor" href="#set" aria-label="Permalink to &quot;set&quot;">​</a></h2><h3 id="hashset" tabindex="-1">HashSet <a class="header-anchor" href="#hashset" aria-label="Permalink to &quot;HashSet&quot;">​</a></h3><blockquote><p>就是封装 <code>Hashmap</code>，value 为一个空对象</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class HashSet&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractSet&lt;E&gt;</span></span>
<span class="line"><span>    implements Set&lt;E&gt;, Cloneable, java.io.Serializable</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 一个特殊的构造器，dummy 主要是区分其他构造器</span></span>
<span class="line"><span>    // 使用 LinkedHashMap 来保存数据</span></span>
<span class="line"><span>    HashSet(int initialCapacity, float loadFactor, boolean dummy) {</span></span>
<span class="line"><span>        map = new LinkedHashMap&lt;&gt;(initialCapacity, loadFactor);</span></span>
<span class="line"><span>    }</span></span></code></pre></div><h3 id="treeset" tabindex="-1">TreeSet <a class="header-anchor" href="#treeset" aria-label="Permalink to &quot;TreeSet&quot;">​</a></h3><blockquote><p>默认使用 <code>TreeMap</code>，可以是用其他 <code>java.util.NavigableMap</code></p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class TreeSet&lt;E&gt; extends AbstractSet&lt;E&gt;</span></span>
<span class="line"><span>    implements NavigableSet&lt;E&gt;, Cloneable, java.io.Serializable</span></span></code></pre></div><h3 id="linkedhashset" tabindex="-1">LinkedHashSet <a class="header-anchor" href="#linkedhashset" aria-label="Permalink to &quot;LinkedHashSet&quot;">​</a></h3><blockquote><p>相对于 <code>HashSet</code> 主要是在迭代时是按照插入顺序</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedHashSet&lt;E&gt;</span></span>
<span class="line"><span>    extends HashSet&lt;E&gt;</span></span>
<span class="line"><span>    implements Set&lt;E&gt;, Cloneable, java.io.Serializable</span></span></code></pre></div><h3 id="concurrentskiplistset-线程安全" tabindex="-1">ConcurrentSkipListSet(线程安全) <a class="header-anchor" href="#concurrentskiplistset-线程安全" aria-label="Permalink to &quot;ConcurrentSkipListSet(线程安全)&quot;">​</a></h3><blockquote><p>封装 <code>ConcurrentSkipListMap</code></p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ConcurrentSkipListSet&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractSet&lt;E&gt;</span></span>
<span class="line"><span>    implements NavigableSet&lt;E&gt;, Cloneable, java.io.Serializable</span></span></code></pre></div><h3 id="copyonwritearrayset-线程安全" tabindex="-1">CopyOnWriteArraySet(线程安全) <a class="header-anchor" href="#copyonwritearrayset-线程安全" aria-label="Permalink to &quot;CopyOnWriteArraySet(线程安全)&quot;">​</a></h3><blockquote><p>与其他的set最大的区别是封装 <code>CopyOnWriteArrayList</code>，而其他set都是封装的 map。</p><p>主要是调用</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class CopyOnWriteArraySet&lt;E&gt; extends AbstractSet&lt;E&gt;</span></span>
<span class="line"><span>        implements java.io.Serializable</span></span>
<span class="line"><span>        </span></span>
<span class="line"><span>    // 核心方法，就是掉用 CopyOnWriteArrayList 的 addIfAbsent</span></span>
<span class="line"><span>    public boolean add(E e) {</span></span>
<span class="line"><span>        return al.addIfAbsent(e);</span></span>
<span class="line"><span>    }</span></span></code></pre></div><h2 id="qeque" tabindex="-1">Qeque <a class="header-anchor" href="#qeque" aria-label="Permalink to &quot;Qeque&quot;">​</a></h2><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public interface Queue&lt;E&gt; extends Collection&lt;E&gt;</span></span></code></pre></div><h3 id="priorityqueue" tabindex="-1">PriorityQueue <a class="header-anchor" href="#priorityqueue" aria-label="Permalink to &quot;PriorityQueue&quot;">​</a></h3><blockquote><p>基于优先堆的一个无界队列，这个优先队列中的元素可以默认自然排序或者通过提供的比较器在队列实例化的时排序。</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class PriorityQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements java.io.Serializable {</span></span></code></pre></div><ul><li>使用最小堆实现</li><li>插入数据不能为null，即不能排序</li><li>扩容的时候如果容量小于 64 ，则翻倍。否则增加 50%</li></ul><h3 id="synchronousqueue-线程安全" tabindex="-1">SynchronousQueue（线程安全） <a class="header-anchor" href="#synchronousqueue-线程安全" aria-label="Permalink to &quot;SynchronousQueue（线程安全）&quot;">​</a></h3><blockquote><p>其内部是没有容器的，所以生产者生产一个数据，就堵塞了，必须等消费者消费后，生产者才能再次生产。</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class SynchronousQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements BlockingQueue&lt;E&gt;, java.io.Serializable {</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 有公平，非公平</span></span>
<span class="line"><span>     public SynchronousQueue(boolean fair)</span></span></code></pre></div><h3 id="linkedblockingqueue-线程安全" tabindex="-1">LinkedBlockingQueue（线程安全） <a class="header-anchor" href="#linkedblockingqueue-线程安全" aria-label="Permalink to &quot;LinkedBlockingQueue（线程安全）&quot;">​</a></h3><blockquote><p>基于双向链表来实现阻塞队列。</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedBlockingQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>        implements BlockingQueue&lt;E&gt;, java.io.Serializable {</span></span>
<span class="line"><span>        </span></span>
<span class="line"><span>        </span></span>
<span class="line"><span>        </span></span>
<span class="line"><span>   /** 最大容量, 没有设置则为 Integer.MAX_VALUE*/</span></span>
<span class="line"><span>    private final int capacity;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 当前元素数量 */</span></span>
<span class="line"><span>    private final AtomicInteger count = new AtomicInteger();</span></span>
<span class="line"><span></span></span>
<span class="line"><span>		// 双端队列头元素</span></span>
<span class="line"><span>    transient Node&lt;E&gt; head;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    // 双端队列队尾元素</span></span>
<span class="line"><span>    private transient Node&lt;E&gt; last;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 出队使用的锁 take, poll, etc */</span></span>
<span class="line"><span>    private final ReentrantLock takeLock = new ReentrantLock();</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 出队等待队列 */</span></span>
<span class="line"><span>    private final Condition notEmpty = takeLock.newCondition();</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 入队使用的锁 put, offer, etc */</span></span>
<span class="line"><span>    private final ReentrantLock putLock = new ReentrantLock();</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 入队等待队列 */</span></span>
<span class="line"><span>    private final Condition notFull = putLock.newCondition();</span></span></code></pre></div><ul><li>大小可以初始化设置，如果不设置，默认设置大小为Integer.MAX_VALUE</li><li>有两个锁对象，可以并行处理</li><li>因为有两把锁，所以不能选择公平锁</li></ul><h3 id="arrayblockingqueue-线程安全" tabindex="-1">ArrayBlockingQueue（线程安全） <a class="header-anchor" href="#arrayblockingqueue-线程安全" aria-label="Permalink to &quot;ArrayBlockingQueue（线程安全）&quot;">​</a></h3><blockquote><p>底层以数组的形式保存数据(实际上可看作一个循环数组)。</p></blockquote><ul><li>初始化时设置数组长度</li><li>是一个有界队列</li><li>只有一个锁对象</li><li>可以选择公平锁</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ArrayBlockingQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>        implements BlockingQueue&lt;E&gt;, java.io.Serializable {</span></span>
<span class="line"><span>        </span></span>
<span class="line"><span>   /** 存放元素 */</span></span>
<span class="line"><span>    final Object[] items;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /**下一次操作位置，即队列最前面元素 take, poll, peek，remove */</span></span>
<span class="line"><span>    int takeIndex;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 下一次添加位置 put, offer, add */</span></span>
<span class="line"><span>    int putIndex;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 当前数量 */</span></span>
<span class="line"><span>    int count;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 所有操作使用的锁 */</span></span>
<span class="line"><span>    final ReentrantLock lock;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 出队等待队列 */</span></span>
<span class="line"><span>    private final Condition notEmpty;</span></span>
<span class="line"><span></span></span>
<span class="line"><span>    /** 入队等待队列 */</span></span>
<span class="line"><span>    private final Condition notFull;</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 可选择公平锁</span></span>
<span class="line"><span>    public ArrayBlockingQueue(int capacity, boolean fair)</span></span></code></pre></div><h3 id="linkedtransferqueue-线程安全" tabindex="-1">LinkedTransferQueue（线程安全） <a class="header-anchor" href="#linkedtransferqueue-线程安全" aria-label="Permalink to &quot;LinkedTransferQueue（线程安全）&quot;">​</a></h3><blockquote><p><code>LinkedTransferQueue</code>是 <code>SynchronousQueue</code> 和 <code>LinkedBlockingQueue</code> 的合体，性能比 <code>LinkedBlockingQueue</code> 更高（没有锁操作），比 <code>SynchronousQueue</code>能存储更多的元素。</p><p>当 <code>put</code> 时，如果有等待的线程，就直接将元素 “交给” 等待者， 否则直接进入队列。</p><p><code>put</code>和 <code>transfer</code> 方法的区别是，put 是立即返回的， transfer 是阻塞等待消费者拿到数据才返回。<code>transfer</code>方法和 <code>SynchronousQueue</code>的 put 方法类似。</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedTransferQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements TransferQueue&lt;E&gt;, java.io.Serializable {</span></span></code></pre></div><h3 id="priorityblockingqueue-线程安全" tabindex="-1">PriorityBlockingQueue（线程安全） <a class="header-anchor" href="#priorityblockingqueue-线程安全" aria-label="Permalink to &quot;PriorityBlockingQueue（线程安全）&quot;">​</a></h3><ul><li>基于优先级的一个无界队列</li><li>底层是基于数组存储元素的</li><li>元素按照优选级顺序存储，优先级是通过Comparable的compareTo方法来实现的（自然排序）</li><li>其只会堵塞消费者，<strong>不会堵塞生产者，数组会不断扩容</strong>，使用时要谨慎。</li><li>在扩容时会先释放锁，保证其他元素可以正常出队，然后使用 CAS 操作确保只有一个线程可以执行扩容逻辑，在扩容结束时会从新获取锁替换数组并复制数据</li><li>使用 <code>contains</code> <code>remove</code>方法需要遍历所有值。</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class PriorityBlockingQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements BlockingQueue&lt;E&gt;, java.io.Serializable {</span></span>
<span class="line"><span>    </span></span>
<span class="line"><span>    // 扩容</span></span>
<span class="line"><span>    // 实际只有一个线程会进行实际扩容，其他线程一直等，但不影响出队操作</span></span>
<span class="line"><span>     private void tryGrow(Object[] array, int oldCap)</span></span></code></pre></div><h3 id="delayqueue-线程安全" tabindex="-1">DelayQueue（线程安全） <a class="header-anchor" href="#delayqueue-线程安全" aria-label="Permalink to &quot;DelayQueue（线程安全）&quot;">​</a></h3><ul><li>基于优先级的一个无界队列</li><li>队列元素必须实现Delayed接口</li><li>支持延迟获取</li><li>元素按照时间排序</li><li>只有元素到期后，消费者才能从队列中取出</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class DelayQueue&lt;E extends Delayed&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements BlockingQueue&lt;E&gt; {</span></span></code></pre></div><h3 id="concurrentlinkedqueue-线程安全" tabindex="-1">ConcurrentLinkedQueue（线程安全） <a class="header-anchor" href="#concurrentlinkedqueue-线程安全" aria-label="Permalink to &quot;ConcurrentLinkedQueue（线程安全）&quot;">​</a></h3><blockquote><p>基于链接节点的无界线程安全的队列，使用cas保证线程安全</p></blockquote><ul><li>不允许null入列</li><li>删除节点是将item设置为null, 队列迭代时跳过item为null节点</li><li>head节点跟tail不一定指向头节点或尾节点，可能存在滞后性</li><li>入列出列线程安全，遍历不安全</li><li>使用 cas 保证线程安全</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ConcurrentLinkedQueue&lt;E&gt; extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>        implements Queue&lt;E&gt;, java.io.Serializable {</span></span></code></pre></div><h2 id="deque" tabindex="-1">Deque <a class="header-anchor" href="#deque" aria-label="Permalink to &quot;Deque&quot;">​</a></h2><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public interface Deque&lt;E&gt; extends Queue&lt;E&gt;</span></span></code></pre></div><h3 id="arraydeque" tabindex="-1">ArrayDeque <a class="header-anchor" href="#arraydeque" aria-label="Permalink to &quot;ArrayDeque&quot;">​</a></h3><blockquote><p>通过循环数组来实现队列。</p></blockquote><ul><li>不能添加null值</li><li>每次扩容都是2的n次方</li></ul><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ArrayDeque&lt;E&gt; extends AbstractCollection&lt;E&gt;</span></span>
<span class="line"><span>                           implements Deque&lt;E&gt;, Cloneable, Serializable</span></span></code></pre></div><h3 id="concurrentlinkeddeque-线程安全" tabindex="-1">ConcurrentLinkedDeque（线程安全） <a class="header-anchor" href="#concurrentlinkeddeque-线程安全" aria-label="Permalink to &quot;ConcurrentLinkedDeque（线程安全）&quot;">​</a></h3><blockquote><p>与 <code>ConcurrentLinkedQueue</code> 的区别是该阻塞队列同时支持FIFO和FILO两种操作方式</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class ConcurrentLinkedDeque&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractCollection&lt;E&gt;</span></span>
<span class="line"><span>    implements Deque&lt;E&gt;, java.io.Serializable {</span></span></code></pre></div><h3 id="linkedblockingdeque-线程安全" tabindex="-1">LinkedBlockingDeque（线程安全） <a class="header-anchor" href="#linkedblockingdeque-线程安全" aria-label="Permalink to &quot;LinkedBlockingDeque（线程安全）&quot;">​</a></h3><blockquote><p>与 <code>LinkedBlockingQueue</code>的区别是该阻塞队列同时支持FIFO和FILO两种操作方式</p></blockquote><div class="language- vp-adaptive-theme"><button title="Copy Code" class="copy"></button><span class="lang"></span><pre class="shiki shiki-themes github-light github-dark vp-code" tabindex="0"><code><span class="line"><span>public class LinkedBlockingDeque&lt;E&gt;</span></span>
<span class="line"><span>    extends AbstractQueue&lt;E&gt;</span></span>
<span class="line"><span>    implements BlockingDeque&lt;E&gt;, java.io.Serializable {</span></span></code></pre></div></div></div></main><footer class="VPDocFooter" data-v-39a288b8 data-v-e257564d><!--[--><!--]--><!----><nav class="prev-next" aria-labelledby="doc-footer-aria-label" data-v-e257564d><span class="visually-hidden" id="doc-footer-aria-label" data-v-e257564d>Pager</span><div class="pager" data-v-e257564d><a class="VPLink link pager-link prev" href="/java/JVM/synchronized.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>上一页</span><span class="title" data-v-e257564d>synchronized</span><!--]--></a></div><div class="pager" data-v-e257564d><a class="VPLink link pager-link next" href="/java/base/jdk%20source%20code%20make.html" data-v-e257564d><!--[--><span class="desc" data-v-e257564d>下一页</span><span class="title" data-v-e257564d>jdk源码编译</span><!--]--></a></div></nav></footer><!--[--><!--]--></div></div></div><!--[--><!--]--></div></div><!----><!--[--><!--]--></div></div>
    <script>window.__VP_HASH_MAP__=JSON.parse("{\"ai_chatchat.md\":\"C-5I3XwS\",\"ai_index.md\":\"C3uIxAdb\",\"ai_localmodel.md\":\"Tw2gKKoN\",\"ai_milvus.md\":\"DLXVt1og\",\"ai_ollama.md\":\"CFq4_H2q\",\"database_es_index.md\":\"rWZQmRDI\",\"database_es_search.md\":\"DYgkGDUU\",\"database_index.md\":\"CyYsFCeT\",\"database_mysql_index.md\":\"CuJIYihY\",\"database_mysql_mysql函数以及用法实例.md\":\"u6ykYWI3\",\"database_mysql_mysql批量插入数据.md\":\"DaNh4Eq3\",\"database_mysql_mysql时间.md\":\"DWoxXVig\",\"database_mysql_window-function.md\":\"CCyTcTgd\",\"database_mysql_windows解压安装.md\":\"C19Kttnb\",\"database_mysql_在线yum安装.md\":\"BzKPrkQx\",\"database_oracle_index.md\":\"Dsy_5pU2\",\"database_oracle_oracle表空间.md\":\"31gfXSOi\",\"database_postgresql_analyze.md\":\"Do3L-P7v\",\"database_postgresql_index.md\":\"D18KvYua\",\"database_postgresql_json.md\":\"C74fkbrx\",\"database_postgresql_stat.md\":\"DYqZXcQR\",\"database_redis_index.md\":\"BmJZXmFc\",\"database_redis_redisson.md\":\"CTBJAQTZ\",\"database_redis_redis之ubuntu安装.md\":\"DKJRwZvL\",\"database_redis_scan 详细.md\":\"BEi20ISO\",\"database_sql-exec-seq.md\":\"CkOjRd6N\",\"database_sqlserver_index.md\":\"W8H3a0uC\",\"database_sqlserver_josn.md\":\"CrFq1yJX\",\"database_sqlserver_permission.md\":\"BkXCoJXu\",\"database_sqlserver_systeminfo.md\":\"I2FdEH5q\",\"index.md\":\"ASEF8oiq\",\"java_base_collection.md\":\"C0-GOF7g\",\"java_base_jdk source code make.md\":\"C-r-BD4o\",\"java_base_string support switch.md\":\"DVGEg6rs\",\"java_concurrent_abstractqueuedsynchronizer.md\":\"DMlkBcUc\",\"java_concurrent_completablefuture.md\":\"BT5po2Ym\",\"java_concurrent_index.md\":\"CqkzN6-G\",\"java_concurrent_threadpool.md\":\"CnX6VWC_\",\"java_index.md\":\"BuiEFAF_\",\"java_jdk_buffer.md\":\"D1LycCFQ\",\"java_jdk_index.md\":\"7SOTERhX\",\"java_jvm_gc.md\":\"BTVxyeMc\",\"java_jvm_jvm parameter.md\":\"M-GzyFr7\",\"java_jvm_jvm remote.md\":\"Bmc11nec\",\"java_jvm_object.md\":\"Bxnpfi7Z\",\"java_jvm_synchronized.md\":\"ATr4FEqW\",\"java_netty_index.md\":\"C7RtvVyG\",\"java_netty_io.md\":\"x5W13Udu\",\"java_other_bytebuddy.md\":\"Bbx1OFkk\",\"java_other_caffeine.md\":\"ClV1Hv47\",\"java_other_excel import.md\":\"pK5TE-mp\",\"java_other_jackjson.md\":\"BGgjIFYQ\",\"java_other_jetcache.md\":\"zrLJfVLe\",\"java_other_maven.md\":\"DpdnrQUW\",\"java_other_micrometer.md\":\"BL3Guya5\",\"java_other_mybatis.md\":\"DS7HYIqt\",\"java_other_mybatisplus.md\":\"C2_BXMHl\",\"java_other_netty.md\":\"CrA25Xyv\",\"java_other_rocket.md\":\"B0YLJIMO\",\"java_other_shardingsphere.md\":\"CSwRfMTG\",\"java_solve production problems.md\":\"CHd075Nh\",\"java_spring-boot_actuator.md\":\"1XMBMnnM\",\"java_spring-boot_index.md\":\"uWmRRFQ7\",\"java_spring-boot_spring-boot启动流程.md\":\"DefndkWB\",\"java_spring-cloud_context.md\":\"Sh0aX5Er\",\"java_spring-cloud_gateway.md\":\"D4ZtJgkJ\",\"java_spring-cloud_index.md\":\"BvRrZuIT\",\"java_spring-cloud_openfeign.md\":\"CZrmF1w_\",\"java_spring-cloud_sentinel.md\":\"BrIvTgEn\",\"java_spring_error.md\":\"D7WMF0Jq\",\"java_spring_event.md\":\"D1pwiRd1\",\"java_spring_index.md\":\"DXr0PepP\",\"java_spring_jdbctemplate.md\":\"BN4BMHn3\",\"java_spring_spring bean接口.md\":\"B84-mAwF\",\"java_spring_spring ioc.md\":\"CJTn2Uqw\",\"java_spring_spring-aop.md\":\"DeEAdXHF\",\"java_spring_spring-webflux.md\":\"uPqwrWpi\",\"java_spring_springmvc中获取request.md\":\"H1K_4FSo\",\"java_spring_spring扩展接口即执行流程.md\":\"BPOrTZUf\",\"java_spring_流程图合集.md\":\"CyQ-R1Qq\",\"java_util_arthas.md\":\"ClnK4ctf\",\"java_util_dateutil.md\":\"CYCrI78B\",\"java_util_jdk util.md\":\"B792RZpG\",\"java_util_jmh.md\":\"CxRr2Hyq\",\"java_util_reactor.md\":\"CkO8ELFN\",\"ops_docker_easyconnectinit.md\":\"EtSw1aZl\",\"ops_docker_index.md\":\"CZi053V-\",\"ops_docker_zabbix.md\":\"BkbumrUE\",\"ops_docker_常用命令.md\":\"Dtbje96Q\",\"ops_docker_软件安装_docker阿里云镜像安装.md\":\"D2YShg03\",\"ops_docker_软件安装_rpm离线安装docker.md\":\"BHf_DbFJ\",\"ops_docker_软件安装_ubuntu安装docker.md\":\"CsaX5nxD\",\"ops_docker_软件安装_【ubuntu】docker远程连接.md\":\"pOJ3xaE1\",\"ops_elasticsearch_index.md\":\"D6Z69L3S\",\"ops_elasticsearch_query_string.md\":\"cwfTzqZH\",\"ops_filebeat_index.md\":\"xjP1c5Qi\",\"ops_grafana_index.md\":\"CodpIuxh\",\"ops_index.md\":\"D_005h1h\",\"ops_jenkins.md\":\"b9dPY37R\",\"ops_k8s_index.md\":\"DakkcrP8\",\"ops_k8s_kubectl cheatsheet.md\":\"BhEtb5pp\",\"ops_k8s_kubectl.md\":\"DC2xuW6B\",\"ops_logstash_index.md\":\"BvsrlTgd\",\"ops_nginx_index.md\":\"GjqBp5pa\",\"ops_nginx_nginx 性能参数调优.md\":\"UvGtJDRm\",\"ops_nginx_nginx-https.md\":\"C2fK3C0N\",\"ops_nginx_nginx安装.md\":\"4FBodQC9\",\"ops_nginx_nginx配置.md\":\"CyejsGBh\",\"ops_prometheus_alertmanager.md\":\"BiRJnCkQ\",\"ops_prometheus_index.md\":\"BxZzlmzU\",\"ops_prometheus_kube-prometheus.md\":\"ASyuFn0p\",\"ops_prometheus_prometheus-operator.md\":\"DnE-TOYu\",\"ops_prometheus_query.md\":\"blO-hIpo\",\"ops_skywalking_client-config.md\":\"CX-UwEBd\",\"ops_skywalking_index.md\":\"DE1odaSQ\",\"ops_skywalking_server-config.md\":\"CCCE3io1\",\"ops_skywalking_source-code.md\":\"6v5NwXvx\",\"ops_skywalking_ui.md\":\"Dp_9w37w\",\"ops_supervisord.md\":\"DTpRRA6f\",\"os_index.md\":\"CXBRDfQF\",\"os_linux_alpine.md\":\"CqRYorDK\",\"os_linux_index.md\":\"BnkGYxSb\",\"os_linux_ubuntu.md\":\"WYGqbVWu\",\"os_linux_其他命令.md\":\"BwAiH_Vx\",\"os_linux_性能分析.md\":\"Dmglx5Fz\",\"os_linux_文本分析.md\":\"CGiNTcgz\",\"os_mac_dnsmasq.md\":\"C15wfnip\",\"os_mac_homebrew.md\":\"BFFblN8T\",\"os_mac_index.md\":\"4bzv7sFm\",\"os_mac_zsh.md\":\"B-JEkfIE\",\"os_mac_环境搭建.md\":\"PhZggTwP\",\"os_soft.md\":\"B2uWnR7z\",\"os_windows_base64.md\":\"C5ccZkKc\",\"os_windows_index.md\":\"BFTXsHKB\",\"os_windows_winserver.md\":\"3N_Byn25\",\"os_windows_wsl.md\":\"KPfeWY3B\",\"os_windows_乱七八糟.md\":\"C0q7DrKv\",\"os_windows_删除服务.md\":\"CPZ0gSxr\",\"other_algorithm_binarysearch.md\":\"CT6JtL7c\",\"other_algorithm_bit.md\":\"5ou0jP3g\",\"other_algorithm_index.md\":\"BIXkgRmF\",\"other_algorithm_常见算法.md\":\"BTpqAIGh\",\"other_algorithm_排列组合.md\":\"BzjaDp_V\",\"other_chrome.md\":\"xItzPhX3\",\"other_http content-type（内容类型）整理.md\":\"6mxINEE1\",\"other_idea相关.md\":\"KxFpwr7U\",\"other_index.md\":\"B9jR2M7k\",\"other_travis自动持续集成.md\":\"B4beBsFD\",\"other_yaml.md\":\"UzU5GQew\",\"other_乱七八糟_jquery各种操作.md\":\"DfazYd4t\",\"other_乱七八糟_正则表达式.md\":\"B9MooPpT\",\"other_收藏转_二分查找法模板.md\":\"C4sNRviZ\",\"util_excel.md\":\"B5bMkGut\",\"util_freemarker.md\":\"DYIe4gue\",\"util_git_config.md\":\"Drdh5xCZ\",\"util_git_count.md\":\"-PYS7cVV\",\"util_git_fileanalyze.md\":\"BnJK9pYS\",\"util_git_git-operation.md\":\"BvfSXJMo\",\"util_git_git-proxy.md\":\"BFLrkzfX\",\"util_git_index.md\":\"CE0JEsq8\",\"util_git_mergeproject.md\":\"B5ZgkGA2\",\"util_gradle_gradle-task.md\":\"BJF6tasS\",\"util_gradle_index.md\":\"B9mXZers\",\"util_index.md\":\"Bbxv7KHq\",\"util_ip.md\":\"DyAMmrBn\",\"util_openwrt.md\":\"D2WASqbD\",\"util_postman-pre-request.md\":\"Bz9-jQsn\",\"util_ppt.md\":\"CPwcJ90N\",\"util_privoxy.md\":\"BI_TErHz\",\"util_python.md\":\"D_mX_FkF\",\"util_unit-test_index.md\":\"CmBJ9QwN\",\"util_unit-test_junit.md\":\"CohEHvqZ\",\"util_unit-test_mockito.md\":\"CljER1Il\",\"util_wireshark.md\":\"C081jrgd\"}");window.__VP_SITE_DATA__=JSON.parse("{\"lang\":\"en-US\",\"dir\":\"ltr\",\"title\":\"大兵个人主页\",\"description\":\"文档\",\"base\":\"/\",\"head\":[],\"router\":{\"prefetchLinks\":true},\"appearance\":true,\"themeConfig\":{\"repo\":\"db117/doc\",\"outlineTitle\":\"当前页\",\"editLinks\":true,\"editLinkText\":\"编辑文档！\",\"docsDir\":\"docs\",\"nav\":[{\"text\":\"首页\",\"link\":\"/\"},{\"text\":\"AI\",\"link\":\"/ai/\"},{\"text\":\"database\",\"link\":\"/database/\"},{\"text\":\"java\",\"link\":\"/java/\"},{\"text\":\"ops\",\"link\":\"/ops/\"},{\"text\":\"os\",\"link\":\"/os/\"},{\"text\":\"other\",\"link\":\"/other/\"},{\"text\":\"util\",\"link\":\"/util/\"},{\"text\":\"关于我\",\"link\":\"https://www.500d.me/cvresume/3244698236/\"},{\"text\":\"其他网站\",\"items\":[{\"text\":\"github\",\"link\":\"https://github.com/db117\"},{\"text\":\"leetcode\",\"link\":\"https://leetcode.cn/u/db117/\"},{\"text\":\"processon\",\"link\":\"https://www.processon.com/u/5aaa7a7ee4b0a84684088ded\"}]}],\"sidebar\":{\"/java/\":[{\"text\":\"JDK\",\"items\":[{\"text\":\"JDK 中的 buffer 体系\",\"link\":\"/java/JDK/Buffer\"}],\"link\":\"/java/JDK/index\",\"collapsible\":true},{\"text\":\"JVM\",\"items\":[{\"text\":\"JVM参数\",\"link\":\"/java/JVM/JVM parameter\"},{\"text\":\"垃圾回收\",\"link\":\"/java/JVM/gc\"},{\"text\":\"java开启远程访问\",\"link\":\"/java/JVM/jvm remote\"},{\"text\":\"对象相关\",\"link\":\"/java/JVM/object\"},{\"text\":\"synchronized\",\"link\":\"/java/JVM/synchronized\"}],\"collapsible\":true},{\"text\":\"base\",\"items\":[{\"text\":\"java集合\",\"link\":\"/java/base/collection\"},{\"text\":\"jdk源码编译\",\"link\":\"/java/base/jdk source code make\"},{\"text\":\"string support switch.md\",\"link\":\"/java/base/string support switch\"}],\"collapsible\":true},{\"text\":\"concurrent\",\"items\":[{\"text\":\"AbstractQueuedSynchronizer相关\",\"link\":\"/java/concurrent/AbstractQueuedSynchronizer\"},{\"text\":\"CompletableFuture\",\"link\":\"/java/concurrent/CompletableFuture\"},{\"text\":\"线程池\",\"link\":\"/java/concurrent/ThreadPool\"}],\"link\":\"/java/concurrent/index\",\"collapsible\":true},{\"text\":\"netty\",\"items\":[{\"text\":\"netty 内存模型\",\"link\":\"/java/netty/IO\"}],\"link\":\"/java/netty/index\",\"collapsible\":true},{\"text\":\"other\",\"items\":[{\"text\":\"MyBatis\",\"link\":\"/java/other/MyBatis\"},{\"text\":\"MybatisPlus\",\"link\":\"/java/other/MybatisPlus\"},{\"text\":\"netty 主要流程\",\"link\":\"/java/other/Netty\"},{\"text\":\"byte-buddy 简单使用\",\"link\":\"/java/other/bytebuddy\"},{\"text\":\"caffeine\",\"link\":\"/java/other/caffeine\"},{\"text\":\"大量Excel导入\",\"link\":\"/java/other/excel import\"},{\"text\":\"jackson常见操作\",\"link\":\"/java/other/jackjson\"},{\"text\":\"jetCache\",\"link\":\"/java/other/jetCache\"},{\"text\":\"maven\",\"link\":\"/java/other/maven\"},{\"text\":\"micrometer\",\"link\":\"/java/other/micrometer\"},{\"text\":\"rocketMQ\",\"link\":\"/java/other/rocket\"},{\"text\":\"shardingsphere\",\"link\":\"/java/other/shardingsphere\"}],\"collapsible\":true},{\"text\":\"线上问题分析\",\"link\":\"/java/solve production problems\"},{\"text\":\"spring\",\"items\":[{\"text\":\"JdbcTemplate\",\"link\":\"/java/spring/JdbcTemplate\"},{\"text\":\"spring Bean接口\",\"link\":\"/java/spring/Spring Bean接口\"},{\"text\":\"Spring IOC\",\"link\":\"/java/spring/Spring IOC\"},{\"text\":\"spring-aop\",\"link\":\"/java/spring/Spring-aop\"},{\"text\":\"SpringMVC中获取request\",\"link\":\"/java/spring/SpringMVC中获取request\"},{\"text\":\"Spring扩展接口即执行流程\",\"link\":\"/java/spring/Spring扩展接口即执行流程\"},{\"text\":\"常见异常\",\"link\":\"/java/spring/error\"},{\"text\":\"Spring event\",\"link\":\"/java/spring/event\"},{\"text\":\"spring-webflux\",\"link\":\"/java/spring/spring-webflux\"},{\"text\":\"流程图合集\",\"link\":\"/java/spring/流程图合集\"}],\"link\":\"/java/spring/index\",\"collapsible\":true},{\"text\":\"spring-boot\",\"items\":[{\"text\":\"Spring Boot - Actuator\",\"link\":\"/java/spring-boot/actuator\"},{\"text\":\"spring-boot启动流程\",\"link\":\"/java/spring-boot/spring-boot启动流程\"}],\"link\":\"/java/spring-boot/index\",\"collapsible\":true},{\"text\":\"spring-cloud\",\"items\":[{\"text\":\"spring-cloud-context 详细源码\",\"link\":\"/java/spring-cloud/context\"},{\"text\":\"gateway\",\"link\":\"/java/spring-cloud/gateway\"},{\"text\":\"spring-cloud-openfeign\",\"link\":\"/java/spring-cloud/openfeign\"},{\"text\":\"sentinel\",\"link\":\"/java/spring-cloud/sentinel\"}],\"link\":\"/java/spring-cloud/index\",\"collapsible\":true},{\"text\":\"util\",\"items\":[{\"text\":\"JMH基准测试\",\"link\":\"/java/util/JMH\"},{\"text\":\"arthas 诊断工具\",\"link\":\"/java/util/arthas\"},{\"text\":\"java 时间工具\",\"link\":\"/java/util/dateUtil\"},{\"text\":\"jdk工具\",\"link\":\"/java/util/jdk util\"},{\"text\":\"Reactor\",\"link\":\"/java/util/reactor\"}],\"collapsible\":true}],\"/os/\":[{\"text\":\"linux\",\"items\":[{\"text\":\"Ubuntu相关\",\"link\":\"/os/linux/Ubuntu\"},{\"text\":\"alpine\",\"link\":\"/os/linux/alpine\"},{\"text\":\"其他命令\",\"link\":\"/os/linux/其他命令\"},{\"text\":\"性能分析\",\"link\":\"/os/linux/性能分析\"},{\"text\":\"文本分析\",\"link\":\"/os/linux/文本分析\"}],\"link\":\"/os/linux/index\",\"collapsible\":true},{\"text\":\"mac\",\"items\":[{\"text\":\"Homebrew相关\",\"link\":\"/os/mac/Homebrew\"},{\"text\":\"MAC 下 DNSmasq 安装于使用\",\"link\":\"/os/mac/dnsmasq\"},{\"text\":\"zsh配置\",\"link\":\"/os/mac/zsh\"},{\"text\":\"各种环境\",\"link\":\"/os/mac/环境搭建\"}],\"link\":\"/os/mac/index\",\"collapsible\":true},{\"text\":\"soft.md\",\"link\":\"/os/soft\"},{\"text\":\"windows\",\"items\":[{\"text\":\"base64 操作\",\"link\":\"/os/windows/base64\"},{\"text\":\"制作win服务\",\"link\":\"/os/windows/winServer\"},{\"text\":\"wsl\",\"link\":\"/os/windows/wsl\"},{\"text\":\"乱七八糟\",\"link\":\"/os/windows/乱七八糟\"},{\"text\":\"删除服务.md\",\"link\":\"/os/windows/删除服务\"}],\"link\":\"/os/windows/index\",\"collapsible\":true}],\"/ai/\":[{\"text\":\"chatchat 本地部署\",\"link\":\"/ai/chatchat\"},{\"text\":\"本地运行大模型\",\"link\":\"/ai/localModel\"},{\"text\":\"Milvus 向量数据库\",\"link\":\"/ai/milvus\"},{\"text\":\"ollama 相关\",\"link\":\"/ai/ollama\"}],\"/database/\":[{\"text\":\"es\",\"items\":[{\"text\":\"ES 查询操作\",\"link\":\"/database/es/search\"}],\"link\":\"/database/es/index\",\"collapsible\":true},{\"text\":\"mysql\",\"items\":[{\"text\":\"Mysql批量插入数据\",\"link\":\"/database/mysql/Mysql批量插入数据\"},{\"text\":\"Windows解压安装\",\"link\":\"/database/mysql/Windows解压安装\"},{\"text\":\"MySQL函数及用法示例\",\"link\":\"/database/mysql/mysql函数以及用法实例\"},{\"text\":\"mysql时间.md\",\"link\":\"/database/mysql/mysql时间\"},{\"text\":\"窗口函数\",\"link\":\"/database/mysql/window-function\"},{\"text\":\"在线yum安装\",\"link\":\"/database/mysql/在线yum安装\"}],\"link\":\"/database/mysql/index\",\"collapsible\":true},{\"text\":\"oracle\",\"items\":[{\"text\":\"ORACLE表空间\",\"link\":\"/database/oracle/oracle表空间\"}],\"link\":\"/database/oracle/index\",\"collapsible\":true},{\"text\":\"postgreSql\",\"items\":[{\"text\":\"sql 分析\",\"link\":\"/database/postgreSql/analyze\"},{\"text\":\"json 类型\",\"link\":\"/database/postgreSql/json\"},{\"text\":\"一些常用的状态信息\",\"link\":\"/database/postgreSql/stat\"}],\"link\":\"/database/postgreSql/index\",\"collapsible\":true},{\"text\":\"redis\",\"items\":[{\"text\":\"Redisson\",\"link\":\"/database/redis/Redisson\"},{\"text\":\"Ubuntu安装Redis\",\"link\":\"/database/redis/Redis之Ubuntu安装\"},{\"text\":\"scan 解析\",\"link\":\"/database/redis/Scan 详细\"}],\"link\":\"/database/redis/index\",\"collapsible\":true},{\"text\":\"sql 语句执行顺序\",\"link\":\"/database/sql-exec-seq\"},{\"text\":\"sqlserver\",\"items\":[{\"text\":\"json 相关\",\"link\":\"/database/sqlserver/josn\"},{\"text\":\"权限相关\",\"link\":\"/database/sqlserver/permission\"},{\"text\":\"数据库信息获取\",\"link\":\"/database/sqlserver/systemInfo\"}],\"link\":\"/database/sqlserver/index\",\"collapsible\":true}],\"/ops/\":[{\"text\":\"Jenkins\",\"link\":\"/ops/Jenkins\"},{\"text\":\"docker\",\"items\":[{\"text\":\"深信服easyConnect在docker中进行透明代理\",\"link\":\"/ops/docker/easyconnectInit\"},{\"text\":\"zabbix\",\"link\":\"/ops/docker/zabbix\"},{\"text\":\"常用命令\",\"link\":\"/ops/docker/常用命令\"},{\"text\":\"软件安装\",\"items\":[{\"text\":\"docker阿里云镜像安装\",\"link\":\"/ops/docker/软件安装/docker阿里云镜像安装\"},{\"text\":\"离线安装docker\",\"link\":\"/ops/docker/软件安装/rpm离线安装docker\"},{\"text\":\"ubuntu安装docker\",\"link\":\"/ops/docker/软件安装/ubuntu安装docker\"},{\"text\":\"【Ubuntu】Docker远程连接\",\"link\":\"/ops/docker/软件安装/【Ubuntu】Docker远程连接\"}],\"collapsible\":true}],\"link\":\"/ops/docker/index\",\"collapsible\":true},{\"text\":\"elasticsearch\",\"items\":[{\"text\":\"query_string\",\"link\":\"/ops/elasticsearch/query_string\"}],\"link\":\"/ops/elasticsearch/index\",\"collapsible\":true},{\"text\":\"filebeat\",\"items\":[],\"link\":\"/ops/filebeat/index\",\"collapsible\":true},{\"text\":\"grafana\",\"items\":[],\"link\":\"/ops/grafana/index\",\"collapsible\":true},{\"text\":\"k8s\",\"items\":[{\"text\":\"Kubectl常用\",\"link\":\"/ops/k8s/Kubectl\"},{\"text\":\"kubectl备忘单\",\"link\":\"/ops/k8s/kubectl cheatsheet\"}],\"link\":\"/ops/k8s/index\",\"collapsible\":true},{\"text\":\"logstash\",\"items\":[],\"link\":\"/ops/logstash/index\",\"collapsible\":true},{\"text\":\"nginx\",\"items\":[{\"text\":\"Nginx 性能参数调优.md\",\"link\":\"/ops/nginx/Nginx 性能参数调优\"},{\"text\":\"Nginx安装.md\",\"link\":\"/ops/nginx/Nginx安装\"},{\"text\":\"Nginx配置.md\",\"link\":\"/ops/nginx/Nginx配置\"},{\"text\":\"nginx-https.md\",\"link\":\"/ops/nginx/nginx-https\"}],\"link\":\"/ops/nginx/index\",\"collapsible\":true},{\"text\":\"prometheus\",\"items\":[{\"text\":\"alertmanager\",\"link\":\"/ops/prometheus/alertmanager\"},{\"text\":\"kube-prometheus\",\"link\":\"/ops/prometheus/kube-prometheus\"},{\"text\":\"prometheus-operator\",\"link\":\"/ops/prometheus/prometheus-operator\"},{\"text\":\"查询语法\",\"link\":\"/ops/prometheus/query\"}],\"link\":\"/ops/prometheus/index\",\"collapsible\":true},{\"text\":\"skywalking\",\"items\":[{\"text\":\"客户端配置\",\"link\":\"/ops/skywalking/client-config\"},{\"text\":\"服务配置\",\"link\":\"/ops/skywalking/server-config\"},{\"text\":\"源码分析\",\"link\":\"/ops/skywalking/source-code\"},{\"text\":\"UI详情\",\"link\":\"/ops/skywalking/ui\"}],\"link\":\"/ops/skywalking/index\",\"collapsible\":true},{\"text\":\"supervisord使用\",\"link\":\"/ops/supervisord\"}],\"/other/\":[{\"text\":\"HTTP content-type（内容类型）整理\",\"link\":\"/other/HTTP content-type（内容类型）整理\"},{\"text\":\"Travis自动持续集成\",\"link\":\"/other/Travis自动持续集成\"},{\"text\":\"algorithm\",\"items\":[{\"text\":\"二分算法\",\"link\":\"/other/algorithm/binarySearch\"},{\"text\":\"位运算\",\"link\":\"/other/algorithm/bit\"},{\"text\":\"常见算法\",\"link\":\"/other/algorithm/常见算法\"},{\"text\":\"排列组合\",\"link\":\"/other/algorithm/排列组合\"}],\"link\":\"/other/algorithm/index\",\"collapsible\":true},{\"text\":\"chrome\",\"link\":\"/other/chrome\"},{\"text\":\"idea相关\",\"link\":\"/other/idea相关\"},{\"text\":\"yaml格式\",\"link\":\"/other/yaml\"},{\"text\":\"乱七八糟\",\"items\":[{\"text\":\"jQuery各种操作\",\"link\":\"/other/乱七八糟/jQuery各种操作\"},{\"text\":\"正则\",\"link\":\"/other/乱七八糟/正则表达式\"}],\"collapsible\":true},{\"text\":\"收藏转\",\"items\":[{\"text\":\"二分查找法模板.md\",\"link\":\"/other/收藏转/二分查找法模板\"}],\"collapsible\":true}],\"/util/\":[{\"text\":\"Freemarker\",\"link\":\"/util/Freemarker\"},{\"text\":\"IP 查询\",\"link\":\"/util/IP\"},{\"text\":\"PPT 小技巧\",\"link\":\"/util/PPT\"},{\"text\":\"Excel 公式\",\"link\":\"/util/excel\"},{\"text\":\"git\",\"items\":[{\"text\":\"常见的配置\",\"link\":\"/util/git/config\"},{\"text\":\"git 常用统计\",\"link\":\"/util/git/count\"},{\"text\":\"git 大文件分析\",\"link\":\"/util/git/fileAnalyze\"},{\"text\":\"git命令\",\"link\":\"/util/git/git-operation\"},{\"text\":\"git代理\",\"link\":\"/util/git/git-proxy\"},{\"text\":\"合并多个 git\",\"link\":\"/util/git/mergeProject\"}],\"link\":\"/util/git/index\",\"collapsible\":true},{\"text\":\"gradle\",\"items\":[{\"text\":\"gradle-task\",\"link\":\"/util/gradle/gradle-task\"}],\"link\":\"/util/gradle/index\",\"collapsible\":true},{\"text\":\"openwrt 编译\",\"link\":\"/util/openwrt\"},{\"text\":\"postman预请求处理\",\"link\":\"/util/postman-pre-request\"},{\"text\":\"privoxy\",\"link\":\"/util/privoxy\"},{\"text\":\"python\",\"link\":\"/util/python\"},{\"text\":\"unit-test\",\"items\":[{\"text\":\"JUnit\",\"link\":\"/util/unit-test/JUnit\"},{\"text\":\"mockito\",\"link\":\"/util/unit-test/mockito\"}],\"link\":\"/util/unit-test/index\",\"collapsible\":true},{\"text\":\"wireshark\",\"link\":\"/util/wireshark\"}]},\"lastUpdatedText\":\"上次更新\",\"smoothScroll\":true,\"docFooter\":{\"prev\":\"上一页\",\"next\":\"下一页\"},\"outline\":[2,6],\"socialLinks\":[{\"icon\":\"github\",\"link\":\"https://github.com/db117\"},{\"icon\":{\"svg\":\"<svg xmlns=\\\"http://www.w3.org/2000/svg\\\" x=\\\"0px\\\" y=\\\"0px\\\" width=\\\"100\\\" height=\\\"100\\\" viewBox=\\\"0 0 16 16\\\"><path d=\\\"M 10.447266 0.265625 A 0.50005 0.50005 0 0 0 10.103516 0.41796875 L 5.65625 4.8671875 L 3.0957031 7.4257812 A 0.50005 0.50005 0 0 0 2.9785156 7.6035156 C 1.769869 8.9739016 1.7865696 11.063913 3.0957031 12.373047 L 5.65625 14.933594 C 7.0176322 16.294976 9.242133 16.294976 10.603516 14.933594 L 12.853516 12.683594 A 0.50063809 0.50063809 0 1 0 12.144531 11.976562 L 9.8945312 14.226562 C 8.9159134 15.20518 7.3418991 15.20518 6.3632812 14.226562 L 3.8027344 11.666016 C 2.8241166 10.687398 2.8241166 9.1114303 3.8027344 8.1328125 L 6.3632812 5.5742188 C 7.3418991 4.5956009 8.9159135 4.5956009 9.8945312 5.5742188 L 12.144531 7.8242188 A 0.50063784 0.50063784 0 1 0 12.853516 7.1171875 L 10.603516 4.8671875 C 9.9106907 4.174363 8.9943718 3.8431189 8.0820312 3.8554688 L 10.8125 1.125 A 0.50005 0.50005 0 0 0 10.447266 0.265625 z M 7.328125 9.4003906 A 0.50005 0.50005 0 1 0 7.328125 10.400391 L 14.228516 10.400391 A 0.50005 0.50005 0 1 0 14.228516 9.4003906 L 7.328125 9.4003906 z\\\"></path></svg>\"},\"link\":\"https://leetcode.cn/u/db117/\",\"ariaLabel\":\"cool link\"}],\"search\":{\"provider\":\"local\"}},\"locales\":{},\"scrollOffset\":134,\"cleanUrls\":false}");</script>
    
  </body>
</html>